package Models;

import java.util.Date;

public class SalesOrderView {
    private int orderId;
    private Date orderDate;
    private boolean exported; 
    private CustomerView customerId;
    
	public int getOrderId() {
		return orderId;
	}
	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public boolean isExported() {
		return exported;
	}
	public void setExported(boolean exported) {
		this.exported = exported;
	}
	public CustomerView getCustomerId() {
		return customerId;
	}
	public void setCustomerId(CustomerView customerId) {
		this.customerId = customerId;
	}

    public String getDisplayID() {
        final String mask = "i000000";
        final String ds = Integer.toString(orderId);
        return mask.substring(0, mask.length() - ds.length()) + ds + " - " + this.customerId.getName();
    }
}
